<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class _paisM extends CI_Model {

    public function __construct() {
        $this->load->database();
    }

    // S E L E C T
    public function getAll() {
        $query = "SELECT * from pais";
        return $this->db->query($query)->result();
    }

    public function get($id) {
        $query = "SELECT * from pais WHERE id_pais='$id'";
        $pais = $this->db->query($query)->result();
        if ($pais != null)
            return $pais[0]->nombre;
        else
            return "";
    }

}